const qs = require('querystring');

var strUrl = 'https://www.baidu.com/s?a^3714#b^5568';

// var tmp = qs.escape(strUrl);

// console.log(tmp);

// console.log(qs.unescape(tmp))

// console.log(qs.parse(strUrl, '&', '='));

var params = {
  name: 'wanghao',
  age: 20
}

// console.log(qs.stringify(params));//name=wanghao&age=20

console.log(qs.stringify(params, '#', '^'));//name^wanghao#age^20

